<template>
    <div>
        <group>
            <cell title="清除缓存" @click.native="cleanCache" is-link></cell>
            <cell title="版本信息" @click.native="version" is-link></cell>
            <cell title="相关法律条款" @click.native="falv" is-link></cell>
            <cell title="关于我们" @click.native="about_me" is-link></cell>
        </group>
        <group>
            <x-button @click.native="logout" type="warn">退出</x-button>
        </group>
    </div>
</template>
<script>
    import {XButton, Group, Cell} from 'vux'
export default {
    components: {
        XButton,
            Group,
            Cell,
    },
    data() {
        return {
            is_show: false
        }
    },
    created(){
    this.$store.commit("storeState", false)

    },
    methods: {
        logout(){
            localStorage.removeItem("chuang_token")
            this.$router.replace("/login")
        },
            cleanCache(){
                console.log(this.$vux)
            this.$vux.loading.show({
                text: "正在清理..."
            }) 
            setTimeout(() => {
                this.$vux.loading.hide()
            }, 3000)
            },
            version(){
                this.$vux.alert.show({
                    title: "版本信息",
                    content: "1.0.0"
                })
            },
            about_me(){
               this.$vux.alert.show({
                    title: "关于我们",
                    content: "上海五亩田科技发展有限公司"
                })
 
            },
            falv(){
                this.$vux.alert.show({
                    title: '法律条款',
                    content: "根据相关法律法规"
                })
            }
    }
}
</script>
